<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<link href="{TPL}css/NewTopFoot.css" rel="Stylesheet" type="text/css">
<link type="text/css" rel="stylesheet" href="{TPL}css/AddItemPanel.css">
<link type="text/css" id="styleName" rel="stylesheet" href="{TPL}css/blue/color.css"/ >    

<script type="text/javascript" src="{TPL}js/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="{TPL}js/jQuery.Extend.js"></script>
<script src="{TPL}js/jQuery.Drag.min.js" type="text/javascript"></script>
<script type="text/javascript" src="{TPL}js/jquery.cookies.2.1.0.min.js"></script>
<script src="{TPL}js/Gobal.js" type="text/javascript"></script>
<script type="text/javascript" src="{TPL}js/wdggcGobal.js"></script>
<link type="text/css" rel="stylesheet" href="{TPL}css/changeEmail.css">


    <style type="text/css">
    #ad20100727{z-index:100;display:none;moz-opacity:0.56;opacity: 0.56; filter:alpha(opacity=56); height:40px;background:#fff url({TPL}images/footlayer.jpg) repeat-x 0 0;position:fixed;_position:absolute;bottom:0;border-top:#5BB6D0 solid 2px;left:0;right:0;width:100%;}
.gg_close{width:15px;right:10px;margin:5px 0 -100px 0;background:url({TPL}images/1000912.gif) no-repeat center 2px;height:15px;position:absolute;z-index:100;}
.gg_img{float:left;position:fixed;_position:absolute;bottom:0;background:;z-index:8;width:950px;height:40px;cursor:pointer;}
.gg_img span{height:40px;width:950px;display:block;}
.zd_hf{position:fixed;_position:absolute;margin-left:-475px;left:50%;height:40px;width:950px;bottom:0;z-index:110;display:none;}
    </style><title>{lang m_modify}Email -{lang g_webname}</title></head>

<body>

{template 'header'}
    
    <div class="admin">
        <div class="ding">
            <div class="shouye">
                <a href="{url_m.php}" title="{lang u_member_center}">{lang m_my_center}</a>
            </div>
            <div class="lb">
               <div class="weizhi">
                      <b>{lang m_location}：</b><a href="{url_m.php}">{lang u_member_center}</a><span>&gt;</span>{lang m_modify_email}
                  </div>
                
                <div class="shezhi">
                    <p>
                        <a href="{url_m.php}">{lang u_member_center}</a><span>|</span>{lang m_set_style}：</p>                   <ul>
                        <li onClick="changeStyle('orange')" class="mypanliS1"></li>
                        <li onClick="changeStyle('grey')" class="mypanliS2"></li>
                        <li onClick="changeStyle('blue')" class="mypanliS3"></li>
                    </ul>
                </div>
            </div>
        </div>

{template 'member_left'}  


<form id="aspnetForm" action="m.php?name=changephone&action=save" method="post" name="aspnetForm">


    <div class="fill">
			<div class="buzhou" style="display:none">
				<img alt="{lang m_modify_email_step_one}" src="{TPL}images/e_1.gif">
				<script type="text/javascript">
				   
				    function getverifycode() {
			var phonenum = $.trim($("#regPhoneTxt").val());
			$.ajax({
				type: "POST",
				url: "/ajax/user_ajax.php?action=getverifycode&phone=" + phonenum,
				dataType: "json",
				contentType: "application/json;utf-8",
				data: "{'phone':'" + phonenum + "'}",
				timeout: 5000,
				error: function(a, b, c) { checkcodechecked = true; },
				success: function(msg) {
					if (msg=="OK") {
						
					}
					else {
						alert(msg);
					}
				}
			});
				
		}
		
		
	function phoneblur(dom) {
		var phone = $(dom).val();
		
		if ($.trim(phone).length <= 0) { $(dom).attr("class", "").val("").next("p").attr("class", ""); $("#getcode").attr("style","margin-left:10px;height:30px;width:90px;float:left;display:none");}
		else {
        var reg = new RegExp("^6\\d{10}");
        if (reg.test($(dom).val())) {
			$.ajax({
                type: "POST",
                url: "/ajax/user_ajax.php?action=checkphone",
                dataType: "json",
                contentType: "application/json;utf-8",
                data: "{'phone':'" + phone + "'}",
                timeout: 10000,
                error: function(a, b, c) {  $(dom).attr("class", "").next("p").attr("class", ""); },
                success: function(msg) {
					//alert(msg);
					if(msg=="OK")
					{
						$(dom).attr("class", "").next("p").attr("class", "").text("");
						$("#getcode").attr("style","margin-left:10px;height:30px;width:90px;float:left;display:block");
					}
					else
					{
						$(dom).attr("class", "wrong").next("p").attr("class", "red").text(msg);
						$("#getcode").attr("style","margin-left:10px;height:30px;width:90px;float:left;display:none");
					}
                }
            });
        }
        else {
            $(dom).attr("class", "wrong").next("p").attr("class", "red").text("{lang u_service_contact_instr1}");
			$("#getcode").attr("style","margin-left:10px;height:30px;width:90px;float:left;display:none");
        }
    }
}

					function ClearnAll() {
				        if (confirm("{lang m_confirm_reset}")) {
				            $("#regPhoneTxt").val("").attr("class", "").next("p").attr("class", "").html("");
				            $("#regCodeTxt").val("").attr("class", "").next("p").attr("class", "").html("");
				            
				        }
				    }
					
					function SubmitForm() {
				        
				         var checkCode = $.trim($("#regCodeTxt").val()).toLowerCase();
				         if (checkCode == "") {
				             $(dom).nextAll("p").html("{lang m_modify_phone_input_code}"); 
				         }
				         else {
				             $("form")[0].submit();
				         }
				    }
				</script>
<script type="text/javascript"> 
var timer = null;
var i = 60;
function aa(){
	$('#getcode').removeAttr('disabled').css('cursor','pointer');
}
function bb(){
	$('#getcode').html('稍等'+i+'秒');
	i--;
	if(i<0){
		$('#getcode').html('{lang u_receive_code}');
		clearInterval(timer);
		i=5;
	}
}
$(function(){
	$('#getcode').click(function(){
	$(this).attr('disabled','disabled').css('cursor','default');
	bb();
	clearInterval(timer);
	timer=setInterval('bb()',1000);
	setTimeout("aa()",1000*60);
})
})
</script> 
			</div>
<div class="biao">
				<table>
				  <tbody><tr>
					<td class="z">{lang u_phone}：</td>
					<td>{$value['tel']}</td>
				  </tr>
				  
				  <tr>
					<td class="z">{lang m_new_phone}：</td>
					<td>
						<input type="text" value="" onBlur="phoneblur(this);"  maxlength="80" id="regPhoneTxt" name="regPhoneTxt">
						
						<p>{lang m_modify_phone_confirm_phone}</p>
						<button type="button" id="getcode" onclick="getverifycode()" name=""
                                            style="margin-left:10px;height:30px;width:90px;float:left;display:none">{lang u_receive_code} </button>
					</td>
				  </tr>
				  <tr>
					<td class="z">{lang u_code}：</td>
					<td><input type="text" id="regCodeTxt" name="regCodeTxt">
                        <p id="checkCode">{lang m_modify_phone_input_code}</p></td>
				  </tr>
				  
				</tbody></table>
			</div>
			<div class="tijiao"><input type="button" onClick="aspnetForm.submit()" value="{lang u_confirm_update}" name="commit" class="">
			<a onClick="ClearnAll()" style="cursor: pointer;">[{lang m_reset}]</a></div>
		</div>


        <div class="yj">
        </div>
    </div>
    
{template 'footer'}

    </form>
</body>
</html>